const {run} = require('zombie/async');
run(function* () {
	try {
		let result = yield new Promise(...);
	} catch (e) {
		// rejected
	}
	throw new Error();
})
.then(function (result) {
	// generator is finished
})
.catch(function (e) {
	// an error in generator
});
